In [4]:
#import package
import matplotlib.pyplot as plt
from astropy.io import fits
import numpy as np
arange=np.arange
hdu=fits.open('Skyserver_Radial9_19_2017 8_52_39 AM.fits')

#get data units
datas=hdu[1].data

#get data
u=datas.field(3)
g=datas.field(4)
r=datas.field(5)
u_g=u-g
g_r=g-r

#figure plot

fig, ax = plt.subplots()
#plt.figure(1)
fig.set_size_inches(20, 15)
legend = ax.legend(loc='upper right', shadow=True, fontsize='x-large')
#legend.get_frame().set_facecolor('#00FFCC')
plt.xlabel('u-g[mag]',fontsize=20)
plt.ylabel('g-r[mag]',fontsize=20)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
plt.grid(True)
plt.plot(u_g,g_r,'bo',10)

x=arange(-4.0,6.0,0.01)
y=2.2-x
plt.plot(x,y,'r')
#plt.axis([1,2.5,0,2])
plt.show()


/home/cfzhang/.local/lib/python3.5/site-packages/matplotlib/axes/_axes.py:545: UserWarning: No labelled objects found. Use label='...' kwarg on individual plots.
  warnings.warn("No labelled objects found. "

Description:

Question 6

In the observable universe, 77% of galaxies are spiral (late) and 20% of galaxies are elliptical (early). How does your percentage of early and late galaxies compare to the universe? Would you say the galaxies in the vicinity of Abell 2255 are representative of the universe as a whole?

Answer

From the color-color map above,the line seprate elliptical and spiral galaxies,the ratio of spiral galaxies is more than 50% the whole,which is not consistent with observational evidence. So,the galaxies int the Abell 2255 can not represent the whole universe!


In [ ]: